Skip to content

chore: create and apply rustfmt.toml#1946

Merged
notmandatory merged 2 commits into
bitcoindevkit:masterfrom
luisschwab:chore/add-rustfmt
May 21, 2025
Merged

chore: create and apply rustfmt.toml#1946
notmandatory merged 2 commits into
bitcoindevkit:masterfrom
luisschwab:chore/add-rustfmt

Conversation

@luisschwab

@luisschwab luisschwab commented Apr 22, 2025

Copy link
Copy Markdown
Member

This PR adds basic formatting configuration for uniform comments. Note that the nightly toolchain is necessary.

Changelog:

  • Create rustfmt.toml with this config:
comment_width = 100
format_code_in_doc_comments = true
wrap_comments = true
  • Apply rustfmt.toml.
  • Update the fmt CI job to use the nightly toolchain.
  • Update PR template to use nightly toolchain.

Note: I had to add #[rustfmt::skip] to test_extract_satisfaction_timelock() because the base64 PSBT would get wrapped due to the slashes.

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo +nightly fmt and cargo clippy before committing

@notmandatory notmandatory added the chore Non-coding related work label Apr 23, 2025
@notmandatory notmandatory moved this to In Progress in BDK Chain Apr 23, 2025
@notmandatory notmandatory moved this from In Progress to Needs Review in BDK Chain Apr 23, 2025
@GideonBature

Copy link
Copy Markdown

tACK #1946

Can you please squash all three commit messages as a single commit?

@oleonardolima oleonardolima left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK 396fff8

Comment thread rustfmt.toml Outdated
@evanlinjin

Copy link
Copy Markdown
Member

Is it some sort of standard to have comment_width = 140?

Currently, most of the documentation is kept within 100.

@luisschwab

luisschwab commented May 16, 2025

Copy link
Copy Markdown
Member Author

Is it some sort of standard to have comment_width = 140?

Not really. Either one is fine for me.

@evanlinjin

Copy link
Copy Markdown
Member

In that case, I would prefer to stick with 100. It means you can see more if you use a split screen.

@luisschwab luisschwab force-pushed the chore/add-rustfmt branch 3 times, most recently from 0ab5ef4 to 0f56c37 Compare May 16, 2025 17:50
@luisschwab

Copy link
Copy Markdown
Member Author

I made an identical PR on bdk_wallet, once this get's merged I'll update it.

@luisschwab luisschwab requested a review from notmandatory May 16, 2025 17:58
@notmandatory

Copy link
Copy Markdown
Member

Try rebasing this PR and it should build fine after that. See changes in #1955

@notmandatory notmandatory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0f56c37

@luisschwab luisschwab force-pushed the chore/add-rustfmt branch from 0f56c37 to 7bdbcdd Compare May 20, 2025 21:37
@luisschwab

Copy link
Copy Markdown
Member Author

Rebased to trigger CI.

@luisschwab luisschwab requested a review from notmandatory May 21, 2025 13:17

@notmandatory notmandatory left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 7bdbcdd

@notmandatory notmandatory merged commit 4a7c0ed into bitcoindevkit:master May 21, 2025
19 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in BDK Chain May 21, 2025
@ValuedMammal ValuedMammal mentioned this pull request May 26, 2025
39 tasks
@luisschwab luisschwab deleted the chore/add-rustfmt branch September 29, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Non-coding related work

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants